// 全局变量
let urlStr =
  process.env.VUE_APP_DIRNAME && process.env.VUE_APP_DIRNAME.replace(/\\/g, '/')
const anovDirname = urlStr.substring(urlStr.lastIndexOf('/') + 1, urlStr.length)
const cmlGlobal = {
  platformName: process.env.VUE_APP_NAME,
  platformVersion: process.env.VUE_APP_VERSION,
  platformCoreVersion: process.env.VUE_APP_CORE_VERSION,
  projectId: process.env.VUE_APP_PROJECTID,
  projectName: process.env.VUE_APP_PROJECTNAME,
  description: process.env.VUE_APP_DESCRIPTION,
  copyright: process.env.VUE_APP_COPYRIGHT,
  projectLocalDir: anovDirname,
  debug: process.env.NODE_ENV !== 'production',
  level: process.env.VUE_APP_LEVEL,
  projectTime: process.env.VUE_APP_TIMRESTAMP,
  pkginfo: process.env.NODE_ENV !== 'production' && process.env.VUE_APP_PKGINFO,
  pkgid: process.env.NODE_ENV !== 'production' && process.env.VUE_APP_PKGID
}

window.__ANOV__ENV = cmlGlobal
export default cmlGlobal
